﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ERF;
using Microsoft.Xna.Framework;
using FirstPerson.Objects.Pickups;

namespace FirstPerson.Objects.Pickups
{
    class Powerup : Pickable
    {
        public Powerup(ERFGame game) : base(game, @"Models\Weapons\AK47\AK47") {
            this.spawnTime = 5f;
            base.Scale = new Vector3(0.05f, 0.05f, 0.05f);
            this.Picked += new EventHandler<PickedEventArgs>(Powerup_Picked);
        }

        void Powerup_Picked(object sender, PickedEventArgs e)
        {
            e.Player.Hp += 25;

            if (e.Player.Hp > 100)
                e.Player.Hp = 100;
        }

        
    }
}
